<div class='top'>
<h1>Listing todos</h1>
</div>
<div class='nav'>
link1 link2 link3
<% if logged_in? %>
<%= current_user.login %>
<% end%>
</div>
<div class='main'>
<table>
  <tr>
    <th>User</th>
    <th>Name</th>
    <th>Start d</th>
    <th>Start t</th>
    <th>Due d</th>
    <th>Due t</th>
    <th>Effort</th>
    <th>Prio</th>
    <th>Time required</th>
    <th>Context</th>
    <th>Done</th>
    <th>Note</th>
  </tr>

<% for todo in @todos %>
  <tr>
    <td><%=h todo.user_id %></td>
    <td><%=h todo.name %></td>
    <td><%=h todo.start_d %></td>
    <td><%=h todo.start_t %></td>
    <td><%=h todo.due_d %></td>
    <td><%=h todo.due_t %></td>
    <td><%=h todo.effort %></td>
    <td><%=h todo.prio %></td>
    <td><%=h todo.time_required %></td>
    <td><%=h todo.context %></td>
    <td><%=h todo.done %></td>
    <td><%=h todo.note %></td>
    <td><%= link_to 'Show', todo %></td>
    <td><%= link_to 'Edit', edit_todo_path(todo) %></td>
    <td><%= link_to 'Destroy', todo, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New todo', new_todo_path %>
</div>